package com.authine.cloudpivot.ext.enums.order.transfer;

/**
 * 开票申请类型
 */
public enum InvoiceApplyTypeEnum {

    ALL(0, "全部"),
    VAT_ORDINARY(1, "增值税普通发票"),
    VAT_SPECIAL(2, "增值税专用发票"),
    NO_INVOICING(3, "不开票"),
    INDIVIDUAL_INVOICING(4, "个人类型发票");

    public Integer id;
    public String text;

    private InvoiceApplyTypeEnum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static InvoiceApplyTypeEnum get(Integer code) {

        for (InvoiceApplyTypeEnum c : InvoiceApplyTypeEnum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
